﻿

// ReSharper disable InconsistentNaming

using System.ComponentModel;
using Newtonsoft.Json;

namespace Aquarinum.WebSocekt.Core.Dtos
{
    /// <summary>
    ///     固化消息类型
    /// </summary>
    public class ConstSocketMessageType
    {
        /// <summary>
        ///     客户端连接成功
        /// </summary>
        public const string CLINET_CONNECTED = "CLINET_CONNECTED";

        /// <summary>
        ///     客户端发送心跳
        /// </summary>
        public const string CLINET_HEARTBEAT = "CLINET_HEARTBEAT";

        /// <summary>
        ///     服务端心跳回执
        /// </summary>
        public const string HEARTBEAT_SUCCESS = "HEARTBEAT_SUCCESS";

        /// <summary>
        ///     回执消息
        /// </summary>
        public const string MESSAGE_RECEIPT = "MESSAGE_RECEIPT";

        /// <summary>
        ///     重发消息
        /// </summary>
        public const string MESSAGE_RESEND = "MESSAGE_RESEND";

        /// <summary>
        ///     授权失败
        /// </summary>
        public const string CLINET_UNAUTH = "CLINET_UNAUTH";
    }

    public class MessageBase
    {
        /// <summary>
        ///     消息内容类型名称
        /// </summary>
        [JsonProperty(PropertyName = "type")]
        public string Type { get; set; }
    }
}